DATABASES = {
    'default': {
        'ATOMIC_REQUESTS': True,
        'ENGINE': 'awx.main.db.profiled_pg',
        'NAME': "{{ pg_database }}",
        'USER': "{{ pg_username }}",
        'PASSWORD': "{{ pg_password }}",
{% if pg_tls|bool %}
        'OPTIONS': {'sslmode': 'require'},
{% endif %}
{% if enable_pgbouncer|bool %}
        'HOST': "pgbouncer",
        'PORT': "{{ pgbouncer_port }}",
{% else %}
        'HOST': "{{ pg_hostname | default('postgres') }}",
        'PORT': "{{ pg_port }}",
{% endif %}
    }
}
